const mongoose = require("./db");
const Schema = mongoose.Schema;
const Model = mongoose.model;
const mzhSchema = new Schema({
  username: String, //用户名
  password: String, //密码
  fence: Array, // 危险圈
  polygons: Array, // 警告圈
  polygonstwo: Array, // 安全圈
  home: Array, //牧民家/羊圈围栏  用于判断开始放牧的时候有多少羊
  beforeGrazingNum: {
    type: Number,
    null: true,
  }, //开始放牧时的羊的数量
  num: Number, //羊群分页
});
const mzhModel = Model("mzh", mzhSchema, "mzh");
// mzhModel.create({
//   username: "admin",
//   password: "admin",
//   fence: [],
//   polygons: [],
//   polygonstwo: [],
//   home: [],
//   beforeGrazingNum: 0,
//   num: 100,
// });
module.exports = {
  mzhModel,
};
